let city = require("./city");
const fs = require("fs");
city = city.map(function (obj, index) {
    const name = obj.name;
    let value = obj.city;
    value = value.map(function (vobj) {
        // console.log(vobj);
        return {
            [vobj.name]: vobj.area
        }
    });
    return {
        [name]: value
    }
});
fs.writeFile("./city_convert.json", JSON.stringify(city), {encoding: "utf8"})
